<?

include 'db-login.php';

//Performing SQL query
//Select all of the prescription medications from the pharmacy
//database that are still being taken and were picked up in the last 6
//months
$query = 'SELECT * FROM pharmacy WHERE MedicationType = \'prescription\' AND EffectiveEndDate is NULL AND DATE_ADD(CURRENT_DATE, INTERVAL -6 MONTH) < EffectiveStartDate;';

$result = mysql_query($query) or die('Query failed: ' . mysql_error());

if ($CurrentPage = "Prescription6Months"){
  include './includes/pharmacy-prescription-pictures.php'; 
}

include './includes/db-close.php';

?>
